#!/bin/sh
MC_max_threads=20
BS_max_threads=20


# Compile Pi program
make

# Run Gauss Legendre
echo "Gauss Legendre - Sequencial"
/usr/bin/time -f "%e" ./bin/prog GaussLegendre
echo "Gauss Legendre - Paralelo"
/usr/bin/time -f "%e" ./bin/prog GaussLegendre 2


# Run Borwein
echo "Borwein - Sequencial"
/usr/bin/time -f "%e" ./bin/prog Borwein
echo "Borwein - Paralelo"
/usr/bin/time -f "%e" ./bin/prog Borwein 2

# Run Monte Carlo
for i in $(seq 1 $MC_max_threads)
do
	echo "Monte Carlo - $i Threads"
	/usr/bin/time -f "%e" ./bin/prog MonteCarlo $i
done

# Compile Black Schole program
make bs

# Run Blach Scholes
for i in $(seq 1 $BS_max_threads)
do
	echo "Black Scholes - $i Threads"
	/usr/bin/time -f "%e" ./bin/prog $i <./doc/entrada_blackscholes.txt
done
